#ifndef XDIE_H
#define XDIE_H

#include "qwidget.h"

class Die : public QWidget
{
public:
	Die(QWidget * parent = 0);
	virtual ~Die();

	void roll(void);
	virtual inline int read(void) const {return value; };
	virtual inline void forceValue(int val) { value = val; };

protected:
	virtual void paintEvent(QPaintEvent *event) override;
	void mousePressEvent(QMouseEvent *event) override;

private:
	int value;
	QImage *mImage;

};

#endif